package com.monster.admin.user.domain.convert;

import com.monster.admin.user.domain.vo.LoginVo;
import com.monster.admin.user.infrastructure.entity.SysUser;
import com.monster.admin.user.infrastructure.entity.SysUserAuth;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

/**
 * 用户实体合并转换
 * @author kuang
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = "spring")
public interface UserConvert {
    /**
     * 将登录信息和用户信息合并
     * @param user 用户信息
     * @param auth 授权信息
     * @return LoginVo
     */
    LoginVo toLoginVo (SysUser user, SysUserAuth auth);
}
